package com.design.pattern.behavioral.templatemethod;

/**
 * description
 *
 * @author RenQiQiang 2019/03/13 11:51
 */
public class DesignPatternCourse extends ACourse{
    private boolean needWriteArticleFlag = false;

    public DesignPatternCourse(boolean needWriteArticleFlag) {
        this.needWriteArticleFlag = needWriteArticleFlag;
    }

    public DesignPatternCourse() {
    }

    @Override
    void packageCourse() {
        System.out.println("提供课程Java代码");
    }

    @Override
    protected boolean needWriteArticle() {
        return this.needWriteArticleFlag;
    }
}
